﻿using DH.Service.Domain;
using DH.Service.ViewModels.Dto;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DH.Web.MVC
{
   
    public static class RazorPageBaseEx
    {
       
        public static List<ViewButtonsDto> GetViewButtons(this IHtmlHelper htmlHelper, IServiceCollection serviceCollection,string viewId)
        {            
            var _uiFeaturesButtonService = serviceCollection.BuildServiceProvider().GetService<UiFeaturesButtonService>();
            var res = _uiFeaturesButtonService.GetViewButtons(viewId);
            return res;
        }
    }
}
